<% content_for(:toolbar) do %>
  <div class="toolbar_buttons">
    <% if can? :create, Alchemy::Attachment %>
      <%= render 'alchemy/admin/uploader/button',
        redirect_url: alchemy.admin_attachments_path,
        model_class: Alchemy::Attachment,
        file_attribute: 'file' %>
    <% end %>
  </div>
  <%= render 'alchemy/admin/partials/search_form' %>
<% end %>

<div id="archive_all" class="with_tag_filter resources-table-wrapper">
  <%= resources_header %>
  <%= render 'files_list' %>

  <div id="library_sidebar">
    <%= render 'filter_bar' %>

    <% if Alchemy::Attachment.tag_counts.any? %>
      <div class="<%= params[:tagged_with].present? ? 'tag-list filtered' : 'tag-list' %>">
        <%= render 'tag_list' %>
      </div>
    <% end %>
  </div>
</div>
